<link rel="stylesheet" href="__STATIC__/plugs/lay-module/treetable-lay/treetable.css?v={:time()}" media="all">
<style>
  .layui-btn:not(.layui-btn-lg ):not(.layui-btn-sm):not(.layui-btn-xs) {
    height: 34px;
    line-height: 34px;
    padding: 0 8px;
  }
  /*.layui-table-cell{*/
  /*display:table-cell;*/
  /*vertical-align: middle;*/
  /*}*/
  able{table-layout: fixed;}
  td{word-break: break-all; word-wrap:break-word;}
  .layui-fluid {
    height:auto;
  }
  .layui-table-cell  {
    height:auto;
    overflow:visible;
    text-overflow:inherit;
    white-space:pre-line;
  }
</style>
<div class="layuimini-container">
  <div class="layuimini-main">
    <table id="currentTable" class="layui-table layui-hide"
           data-auth-add="{:auth('system.myapp/add')}"
           data-auth-edit="{:auth('system.myapp/edit')}"
           data-auth-delete="{:auth('system.myapp/delete')}"
           data-auth-update="{:auth('system.myapp/edit')}"
           data-auth-export="{:auth('system.myapp/export')}"
           data-auth-uninstall="{:auth('system.myapp/uninstall')}"
           data-auth-install="{:auth('system.myapp/install')}"
           lay-filter="currentTable">
    </table>
  </div>
</div>
<script type="text/html" id="toolbar">
  <button class="layui-btn layui-btn-sm layuimini-btn-primary" data-treetable-refresh><i class="fa fa-refresh"></i> </button>
  <button class="layui-btn layui-btn-normal layui-btn-sm {if !auth('system.myapp/add')}layui-hide{/if}" data-open="system.myapp/edit" data-title="修改" data-full="true"><i class="fa fa-plus"></i> 修改</button>
  <button class="layui-btn layui-btn-sm layui-btn-danger {if !auth('system.myapp/del')}layui-hide{/if}" data-url="system.models/del" data-treetable-delete="currentTableRenderId"><i class="fa fa-trash-o"></i> 删除</button>
</script>
<script type="text/html" id="right_button">
  <button class="layui-btn layui-btn-danger layui-btn-xs {if !auth('system.myapp/delete')}layui-hide{/if}" data-request="system.myapp/delete?name={{d.name}}" data-title="删除">删除</button>
  {{# if(d.state==0){}}<button class="layui-btn layui-btn-normal layui-btn-xs {if !auth('system.myapp/install')}layui-hide{/if}" data-request="system.myapp/install?name={{d.name}}" data-title="安装">安装</button>{{# } }}
  {{# if(d.install==1){}}<button class="layui-btn layui-btn-normal layui-btn-xs {if !auth('system.myapp/export')}layui-hide{/if}" data-open="system.myapp/export?assets={{d.assets}}" data-title="导出">导出</button>{{# } }}
  {{# if(d.state==1){}}<button class="layui-btn layui-btn-normal layui-btn-xs {if !auth('system.myapp/uninstall')}layui-hide{/if}" data-request="system.myapp/uninstall?name={{d.name}}" data-title="卸载">卸载</button>{{# } }}
</script>